80121: Function test xfi:context-period

Documentation

Tests of function xfi:context-period($context as schema-element(xbrli:context)) as element(xbrli:period)

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 19-02-2008 at 00:00:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670675

Test Case Variations


V-01 Returns correct element for an instant context

Documentation

Inputs

Outputs

  • Result test: $result instance of element(xbrli:period) and count( $result ) eq 1 and $result is /xbrli:xbrl/xbrli:context[@id eq 'context-earth']/xbrli:period

V-02 Period for start-end duration context

Documentation

Inputs

  • schema: period-tests.xsd
  • instance: hello-worlds-instance.xml (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:context-period( /xbrli:xbrl/xbrli:context[@id eq 'context-romulus'] )

    (against file V02)

Outputs

  • Result test: $result instance of element(xbrli:period) and count( $result ) eq 1 and $result is (//xbrli:period)[2]

V-04 Period for a forever period context

Documentation

Inputs

Outputs

  • Result test: $result instance of element(xbrli:period) and count( $result ) eq 1 and $result/xbrli:forever

V-05 Wrong node to function

Documentation

XPath-defined error for node type incorrect.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

V-06 A sequence of contexts as argument

Documentation

XPath-defined error for node type incorrect arity of argument.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

Revisions

Name On Details
Herm Fischer 19-02-2008 at 00:00:00 Created the test case.